package android.medicalcloud.com.yiapp.yilian.model;

import android.medicalcloud.com.yiapp.base.utils.ListUtil;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by wanggenlin on 17-5-18.
 */
public class ScheduleModeal implements Serializable{

    List<String> complete;
    List<String> noComplete;


    public List<String> getComplete() {
        return complete;
    }

    public List<String> getNoComplete() {
        return noComplete;
    }
    public List<Integer> getNoCompleteInt() {
        List<Integer> list = new ArrayList<>();
        if (!ListUtil.isNullOrEmpty(noComplete)){
            for (String str:noComplete){
               String[] array =  str.split("-");
                if (array!=null){
                    String s = array[array.length-1];
                    try {
                        list.add(Integer.parseInt(s));
                    }catch (Exception e){
                    }
                }
            }
        }
        return list;
    }
    public List<Integer> getCompleteInt() {
        List<Integer> list = new ArrayList<>();
        if (!ListUtil.isNullOrEmpty(complete)){
            for (String str:complete){
                String[] array =  str.split("-");
                if (array!=null){
                    String s = array[array.length-1];
                    try {
                        list.add(Integer.parseInt(s));
                    }catch (Exception e){
                    }
                }
            }
        }
        return list;
    }

}
